3.371 \(\int \sqrt {\frac {a}{x^2}+b x^n} \, dx\)

Optimal. Leaf size=61 \[ \frac {2 x \sqrt {\frac {a}{x^2}+b x^n}}{n+2}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^n}}\right )}{n+2} \]

[Out]

-2*arctanh(a^(1/2)/x/(a/x^2+b*x^n)^(1/2))*a^(1/2)/(2+n)+2*x*(a/x^2+b*x^n)^(1/2)/(2+n)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2007, 2029, 206} \[ \frac {2 x \sqrt {\frac {a}{x^2}+b x^n}}{n+2}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^n}}\right )}{n+2} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a/x^2 + b*x^n],x]

[Out]

(2*x*Sqrt[a/x^2 + b*x^n])/(2 + n) - (2*Sqrt[a]*ArcTanh[Sqrt[a]/(x*Sqrt[a/x^2 + b*x^n])])/(2 + n)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2007

Int[((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[(x*(a*x^j + b*x^n)^p)/(p*(n - j)), x] + Dist
[a, Int[x^j*(a*x^j + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, j, n}, x] && IGtQ[p + 1/2, 0] && NeQ[n, j] && EqQ[
Simplify[j*p + 1], 0]

Rule 2029

Int[(x_)^(m_.)/Sqrt[(a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[-2/(n - j), Subst[Int[1/(1 - a*x^2
), x], x, x^(j/2)/Sqrt[a*x^j + b*x^n]], x] /; FreeQ[{a, b, j, n}, x] && EqQ[m, j/2 - 1] && NeQ[n, j]

Rubi steps

\begin {align*} \int \sqrt {\frac {a}{x^2}+b x^n} \, dx &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^n}}{2+n}+a \int \frac {1}{x^2 \sqrt {\frac {a}{x^2}+b x^n}} \, dx\\ &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^n}}{2+n}-\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {1}{x \sqrt {\frac {a}{x^2}+b x^n}}\right )}{2+n}\\ &=\frac {2 x \sqrt {\frac {a}{x^2}+b x^n}}{2+n}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+b x^n}}\right )}{2+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 78, normalized size = 1.28 \[ \frac {x \sqrt {\frac {a}{x^2}+b x^n} \left (2 \sqrt {a+b x^{n+2}}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b x^{n+2}}}{\sqrt {a}}\right )\right )}{(n+2) \sqrt {a+b x^{n+2}}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a/x^2 + b*x^n],x]

[Out]

(x*Sqrt[a/x^2 + b*x^n]*(2*Sqrt[a + b*x^(2 + n)] - 2*Sqrt[a]*ArcTanh[Sqrt[a + b*x^(2 + n)]/Sqrt[a]]))/((2 + n)*
Sqrt[a + b*x^(2 + n)])

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+b*x^n)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b x^{n} + \frac {a}{x^{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+b*x^n)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*x^n + a/x^2), x)

________________________________________________________________________________________

maple [F]  time = 0.72, size = 0, normalized size = 0.00 \[ \int \sqrt {b \,x^{n}+\frac {a}{x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a/x^2+b*x^n)^(1/2),x)

[Out]

int((a/x^2+b*x^n)^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b x^{n} + \frac {a}{x^{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x^2+b*x^n)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*x^n + a/x^2), x)

________________________________________________________________________________________

mupad [B]  time = 5.17, size = 97, normalized size = 1.59 \[ \frac {x\,\sqrt {b\,x^n+\frac {a}{x^2}}}{\frac {n}{2}+1}+\frac {\sqrt {a}\,x\,\mathrm {asin}\left (\frac {\sqrt {a}\,1{}\mathrm {i}}{\sqrt {b}\,x^{\frac {n}{2}+1}}\right )\,\sqrt {b\,x^n+\frac {a}{x^2}}\,1{}\mathrm {i}}{\sqrt {b}\,x^{\frac {n}{2}+1}\,\left (\frac {n}{2}+1\right )\,\sqrt {\frac {a}{b\,x^{n+2}}+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^n + a/x^2)^(1/2),x)

[Out]

(x*(b*x^n + a/x^2)^(1/2))/(n/2 + 1) + (a^(1/2)*x*asin((a^(1/2)*1i)/(b^(1/2)*x^(n/2 + 1)))*(b*x^n + a/x^2)^(1/2
)*1i)/(b^(1/2)*x^(n/2 + 1)*(n/2 + 1)*(a/(b*x^(n + 2)) + 1)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {a}{x^{2}} + b x^{n}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a/x**2+b*x**n)**(1/2),x)

[Out]

Integral(sqrt(a/x**2 + b*x**n), x)

________________________________________________________________________________________